package com.itheima.idea;

public class Arry {
    public static void main(String[] args) {
        //静态初始化完整格式:数据类型[]
      /*  int[] arr = new int[]{11,22,33};
        System.out.println(arr[0]);
        System.out.println(arr[1]);

        int[] arr2 = {11,22,33};
        System.out.println(arr2[0]);
        System.out.println(arr2[1]);
        System.out.println(arr2[2]);*/
        int[] arr = {333, 33, 66};
        int sum = 0;
        for (int i = 0; i < arr.length; i++) {
            sum += arr[i];
            System.out.println(arr[i]);
            System.out.println("sum = " + sum);
        }

    }

}






